package com.gbk.clickhouseservicestruct.model;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.myweb.ck.mapping.ChTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ChTable(name = "tig.T_TIG_PED")
public class TIG_Ped {


    /**
     * ID 主键 唯一 报警表id
     */
    private String id;

    /**
     * 区域号
     */
    private int areano;

    /**
     * 路口号
     */
    private int juncno;


    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dectime;


    /**
     * 方向号
     */
    private int dirno;

    /**
     * 检测区域号
     */
    private int segno;

    /**
     * 人行横道编号
     */
    private int laneno;

    /**
     * 行人个数
     */
    private int pednum;

    /**
     * 上行行人个数
     */
    private int pednumup;

    /**
     * 下行行人个数
     */
    private int pednumdown;

    /**
     * 老人小孩标记1有0无
     */
    private int youngoldflag;

    /**
     * 检测器ip
     */
    private String decid;

    /**
     * 持续时间
     */
    private int contsec;


    @Transient
    private int decstatus;

    /**
     * 非机动车数量
     */
    private int nonmotor;
}
